create table if not exists students (name string,age  int,address string)
comment '学生表'
partitioned by(school string)
row format delimited fields terminated by ','
stored as orcfile;

create table if not exists scores(name string,score double,subject string)
comment '成绩表'
partitioned by(school string)
row format delimited fields terminated by ','
stored as orcfile;

hive直接追加数据到末尾
insert into  table students partition(school='zx') values ('hhe',18,'h'),('hh',20,'oo');
会覆盖,相当于删除再增加
insert overwrite table students partition(school='zx') values ('hhe',18,'h'),('hh',20,'oo');

insert overwrite table scores partition(school='zx') values ('hhe',66.7,'yw'),('hh',86.3,'yw');
 